//
//  HISearchPageViewController.swift
//  Health_Infomation
//
//  Created by 林帆 on 2017/8/17.
//  Copyright © 2017年 林帆. All rights reserved.
//

import UIKit

class HISearchPageViewController: HIRootViewController ,HISearchCollectionCellDelegate {
   
    lazy var _SearhBar = UISearchBar()
    lazy var _HISearchCollectionView =  HISearchCollectionView(DataArray:
        [["推荐","中医养生","美容养颜","运动健身","视频","两性","女性健康","膳食养生","保健","心理实验室"],["穿衣搭配","育儿","美食","夏季健康","冷知识","房价","极限挑战","娱乐资讯","共享单车","美食","育儿"]])
    override func viewDidLoad() {
        super.viewDidLoad()
        ConfigSearBar()
        ConfigMainUI()
    }

    func ConfigSearBar() {
        _SearhBar.backgroundColor = UIColor.blue
        view.addSubview(_SearhBar)
        _SearhBar.snp.makeConstraints { (make) in
            make.top.equalTo(_NavBar.snp.bottom).offset(10)
            make.height.equalTo(33)
            make.width.equalTo(kScreenWitdh)
            make.left.equalTo(self.view)
        }
    }
    
    func ConfigMainUI() {
        _HISearchCollectionView.backgroundColor = kRGBColorFromHex(rgbValue: 0xfafafa)
        _HISearchCollectionView.HISearchCollCellDelegate = self
        self.view.addSubview(_HISearchCollectionView)
        _HISearchCollectionView.snp.makeConstraints { (make) in
            make.left.right.bottom.equalTo(self.view)
            make.top.equalTo(_SearhBar.snp.bottom).offset(22)
        }
    }
    
    func HISearchCollectionCellEdit(title: String) {
        print(title)
    }
    
    deinit {
        print("xxxxxwww")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        
    }

}
